5f78c6
@@ -107,6 +107,7 @@
public final class NIOConverter {
     public static ByteBuffer toByteBuffer(Short value) {
         ByteBuffer buf = ByteBuffer.allocate(2);
         buf.putShort(value);
+        buf.flip();
         return buf;
     }
 
@@ -114,6 +115,7 @@
public final class NIOConverter {
     public static ByteBuffer toByteBuffer(Integer value) {
         ByteBuffer buf = ByteBuffer.allocate(4);
         buf.putInt(value);
+        buf.flip();
         return buf;
     }
 
@@ -121,6 +123,7 @@
public final class NIOConverter {
     public static ByteBuffer toByteBuffer(Long value) {
         ByteBuffer buf = ByteBuffer.allocate(8);
         buf.putLong(value);
+        buf.flip();
         return buf;
     }
 
@@ -128,6 +131,7 @@
public final class NIOConverter {
     public static ByteBuffer toByteBuffer(Float value) {
         ByteBuffer buf = ByteBuffer.allocate(4);
         buf.putFloat(value);
+        buf.flip();
         return buf;
     }
 
@@ -135,6 +139,7 @@
public final class NIOConverter {
     public static ByteBuffer toByteBuffer(Double value) {
         ByteBuffer buf = ByteBuffer.allocate(8);
         buf.putDouble(value);
+        buf.flip();
         return buf;
     }
 
